# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from article.models import Article
from django.db import models
from datetime import datetime
# Create your models here.

class Mseeage(models.Model):

    MSEEAGE_TYPE=(
        (1,"文章"),
        (2,"站点"),
        (3,"留言"),
    )
    mseeage_to =models.ForeignKey("self", null=True, blank=True, verbose_name="留言回复")
    mseeage_for = models.ForeignKey(Article, null=True, blank=True, verbose_name="文章回复")
    name=models.CharField(default='', max_length=30, verbose_name=u'姓名')
    email = models.CharField(default='', max_length=30, verbose_name=u'邮箱')
    webadress = models.CharField(default='', max_length=30, verbose_name=u'站点',null=True, blank=True,)

    message_desc = models.TextField(verbose_name="内容", default='')
    article_type = models.IntegerField(verbose_name=u'留言类型', choices=MSEEAGE_TYPE,default=1)
    add_time = models.DateField(default=datetime.now, verbose_name=u'添加时间')
